<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/9/29
  Time: 10:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../common.jsp" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<p>
<h1>您好，${username}</h1>
<a href="${contextPath}/user.do?method=logout">退出</a>
</p>
<p>
    <a href="${contextPath}/views/user/add.jsp">添加</a>
</p>
<table border="1">
    <tr>
        <th>ID</th>
        <th>用户名</th>
        <th>手机号</th>
        <th>操作</th>
    </tr>
    <c:forEach items="${data}" var="item">
        <tr>
            <td>${item.id}</td>
            <td>${item.userName}</td>
            <td>${item.phone}</td>
            <td><a href="${contextPath}/user.do?id=${item.id}&method=get_one">编辑</a>&nbsp;&nbsp;
                <a href="${contextPath}/user.do?id=${item.id}&method=remove">删除</a></td>
        </tr>
    </c:forEach>
</table>
</body>
</html>
